import request from '@/network/request';

// 搜素提示  keyword 例子: 地毯// order 排序
function getHelp(data) {
  return request({
    url: '/search/helperaction',
    data,
  })
};

// 关键词和搜索历史接口 openId
function getAction(data) {
  return request({
    url: '/search/indexaction',
    data,
  })
};

// 搜索关键词 添加到数据库
function getAddhistoryaction(data) {
  return request({
    method: 'post',
    url: '/search/addhistoryaction',
    data
  })
}

// 搜索关键词
function getHistory(data) {
  return request({
    method: 'get',
    url: '/search/helperaction',
    data
  })
}
// 删除历史记录 search/clearhistoryAction  参数openId
function getClearHistory(data) {
  return request({
    method: 'post',
    url: '/search/clearhistoryAction',
    data
  }) 
}
export {
  getHelp,
  getAction,
  getAddhistoryaction,
  getHistory,
  getClearHistory
}